﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;
using SWCInvoice.Model;

namespace SWCInvoice.ViewModel
{
    public class CultureViewModel : ViewModelBase
    {
        #region Fields

        /// <summary>
        /// The list of cultures
        /// </summary>
        ObservableCollection<Culture> _cultures;

        /// <summary>
        /// Current culture
        /// </summary>
        Culture _currentCulture;
        #endregion

        #region Properties

        /// <summary>
        /// The list of the cultures
        /// </summary>
        public ObservableCollection<Culture> Cultures
        {
            get
            {
                return _cultures == null ? _cultures = new ObservableCollection<Culture>() : _cultures;
            }
            set
            {
                if (_cultures == value)
                    return;
                _cultures = value;
                RaisePropertyChanged("Cultures");
            }
        }

        /// <summary>
        /// Gets or sets current culture
        /// </summary>
        public Culture CurrentCulture
        {
            get { return _currentCulture; }
            set
            {
                if (_currentCulture == value) return;
                _currentCulture = value;
                RaisePropertyChanged("CurrentCulture");
            }
        }

        #endregion
        
    }
}
